@extends('layout.admin')
@section('title','用户列表')
@section('content')
<div class="panel-heading">
	<h2>用户列表</h2>
	<div class="panel-ctrls" data-actions-container="" data-action-collapse="{&quot;target&quot;: &quot;.panel-body&quot;}"><span class="button-icon has-bg"><i class="ti ti-angle-down"></i></span></div>
</div>
<div class="table-responsive">
  <table class="table table-bordered">
	<thead>
	  <tr>
		<th>用户ID</th>
		<th>头像</th>
		<th>用户名</th>
		<th>邮箱</th>
		<th>电话号码</th>
		<th>注册时间</th>
		<th>权限</th>
		<th>操作</th>
	  </tr>
	</thead>
	<tbody>
	@foreach($users as $k=>$v)
	  <tr class="@if($k % 2 == 1) info @endif">
		<td scope="row">{{$v->id}}</td>
		<td><img style="width:80px;" src="{{$v->face}}" alt=""></td>
		<td>{{$v->username}}</td>
		<td>{{$v->email}}</td>
		<td>{{$v->phone}}</td>
		<td>{{date('Y-m-d h:i:s',$v->regtime)}}</td>
		<td>{{getUserAuth($v->auth)}}</td>
		<td><a href="/user/edit?id={{$v->id}}">修改</a>|<a href="/user/delete?id={{$v->id}}">删除</a></td>
	  </tr>
	@endforeach
	</tbody>
  </table>
   <div id="pages" class="pull-right col-md-offset-4">
        {!! $users->appends($request->all())->render() !!}
   </div>
</div>
@endsection